package qx.hyj.petrescue.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "发送内容")
@TableName("content")
@Builder
public class Content implements BaseEntity<Integer> {

    @Schema(description = "内容id")
    @TableField("Id")
    private Integer Id;

    @Schema(description = "内容")
    @TableField("content")
    private String content;

    @Schema(description = "发送者id")
    @TableField("sendId")
    private Integer sendId;

    @Schema(description = "接收者id")
    @TableField("receiveId")
    private Integer receiveId;

    @Schema(description = "发送时间")
    @TableField("createTime")
    private LocalDateTime createTime;

    @Schema(description = "是否已读")
    @TableField("isRead")
    private Integer isRead;

    @Override
    public Integer getPrimary() {
        return 0;
    }

    @Override
    public void setPrimary(Integer integer) {
        this.Id = integer;
    }

    @Override
    public Integer genPrimary() {
        return 0;
    }
}
